﻿using System;
using System.Threading;

namespace RevitInteractiveUtility.ExternalEventManager
{
	internal class ExternalEventRequest
	{
		internal int Take()
		{
			return Interlocked.Exchange(ref this.m_iRequest, 0);
		}

		internal void Make(int requestKey)
		{
			Interlocked.Exchange(ref this.m_iRequest, requestKey);
		}

		private int m_iRequest = -1;
	}
}
